import {PageCard, PageCardContent, PageCardTitle} from "plain-design";
import {designComponent} from "@peryl/react-compose";

export const DemoRow = designComponent({
  name: 'demo-row',
  props: {
    title: { type: String },
  },
  slots: ['default'],
  setup({ props, slots }) {
    return () => (
      <PageCard>
        {!!props.title && <PageCardTitle title={props.title}/>}
        <PageCardContent>
          {slots.default()}
        </PageCardContent>
      </PageCard>
    );
  },
});
